package tuanda.soict.firstsun.EffectPackage;

import tuanda.soict.firstsun.LogicPackage.Army;
import tuanda.soict.firstsun.LogicPackage.Scenario;

public class Poison_Effect extends Effect {

	public Poison_Effect(int id, String name, int dur, int point,
			Scenario scenario) {
		super(id, name, dur, point, scenario);
	}

	@Override
	public void beforeAct(Army army) {
	}

	@Override
	public void mainAct(Army army) {
		if (army.getHealth() - getEffectPoint() > 0) {
			army.setHealth(army.getHealth() - this.getEffectPoint());
		} else {
			army.setHealth(1);
		}
	}

	@Override
	public void afterAct(Army army) {
	}
}
